using System.Collections.Generic;
using TK.Character;

namespace TK.Influence
{
    /// <summary>
    /// 阵营，势力类
    /// </summary>
    public class Camp
    {
        /// <summary>
        /// ID
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 阵营的君主
        /// </summary>
        public Hero King { get; set; }

        /// <summary>
        /// 阵营的所有将领
        /// </summary>
        public List<Hero> Heroes { get; set; }

        /// <summary>
        /// 阵营的所有城池
        /// </summary>
        public List<Settlement> Settlements { get; set; }

        /// <summary>
        /// 阵营拥有的金钱
        /// </summary>
        public int Money
        {
            get
            {
                int temp = 0;
                foreach (Settlement settlement in Settlements)
                {
                    temp += settlement.Money;
                }
                return temp;
            }
        }

        /// <summary>
        /// 阵营所拥有的粮草
        /// </summary>
        public int Hay
        {
            get
            {
                int temp = 0;
                foreach (Settlement settlement in Settlements)
                {
                    temp += settlement.Hay;
                }
                return temp;
            }
        }

    }
}
